import request from '@/utils/request'
/**
 * 楼宇列表查询
 * @param {*} params 查询参数
 * @returns
 */
export function getEnterpriseListAPI(params) {
  return request({
    url: 'park/enterprise',
    params
  })
}
/**
 * 园区管理-查询企业所属行业列表 下拉框
 * @returns
 */
export function addEnterpriseListAPI() {
  return request.get('park/industry')
}
/**
 * 增加企业
 * @param {*} data  数据
 * @returns
 */
export function addEnterpriseAPI(data) {
  return request({
    url: '/park/enterprise',
    method: 'POST',
    data
  })
}
/**
 * 回显数据接口
 * @param {*} id
 * @returns
 */
export function reversEnterptiseAPI(id) {
  return request.get(`/park/enterprise/${id}`)
}
/**
 * 编辑接口
 * @param {*} data
 * @returns
 */
export function editEnterptiseAPI(data) {
  return request({
    url: '/park/enterprise',
    method: 'PUT',
    data
  })
}
/**
 * 删除企业接口
 * @param {*} id 企业id
 * @returns
 */
export function deleteEnterpriseAPI(id) {
  return request.delete(`/park/enterprise/${id}`)
}
/**
 * 获取可租赁的楼宇
 * @returns
 */
export function addRentBuddingAIP() {
  return request.get('/park/rent/building')
}
/**
 * 添加合同接口
 * @param {*} data
 * @returns
 */
export function addRentAPI(data) {
  return request({
    url: '/park/enterprise/rent',
    method: 'POST',
    data
  })
}
/**
 * 展开查看合同接口
 * @param {*} id
 * @returns
 */
export function openRentApi(id) {
  return request.get(`/park/enterprise/rent/${id}`)
}
/**
 * 删除合同接口
 * @param {*} id
 * @returns
 */
export function delRentingAPI(id) {
  return request.delete(`/park/enterprise/rent/${id}`)
}
/**
 * 退租企业合同
 * @param {*} id
 * @returns
 */
export function rentingOutAPI(id) {
  return request.put(`/park/enterprise/rent/${id}`)
}
